<!-- extend base layout -->
{% extends "base.html" %}
{% block css %}
{% endblock %}
{% block content %}
<!-- <div class="row">
  <div class="col-md-12 col-sm-12 col-xs-12">
     <div class="x_panel">
        <div class="page-title">
          <div class="row">
            <div class="col-md-10 col-sm-12 col-xs-12">
              <h3>
                <i class="fa fa-cloud-download"></i>
                下载
                <small>下载服务获取资源</small>
              </h3>
            </div>
            <div class="col-md-2 col-sm-12 col-xs-12">
              <form action="{{ url_for('admin_updates_reload') }}" method="post">
                <button id="reload" type="submit" class="btn btn-info">
                  <i class="fa fa-refresh"></i>
                </button>
              </form>
            </div>
          </div>
        </div> 
        <div class="clearfix"></div>
     </div>
  </div>
</div> -->
<!-- {% if connected == false %}
<div class="row">
  <div class="row">
    <div class="col-md-12 col-sm-12 col-xs-12">
      <div class="x_panel">
        <div class="x_title">
          <h2>
            现在无法联系下载服务
            <small>Try again later...</small>
          </h2>
          <div class="clearfix"></div>
        </div>
        <div class="x_content">
          这可能是网络问题，或者我们目前正在更新下载服务
          <div class="clearfix"></div>                        
        </div>
      </div>
    </div>
  </div>
</div>   
{% elif registered == false %}
<div class="row">
  <div class="row">
    <div class="col-md-12 col-sm-12 col-xs-12">
      <div class="x_panel">
        <div class="x_title">
          <h2>
            未注册
            <small>未注册无法下载服务.</small>
          </h2>
          <div class="clearfix"></div>
        </div>
        <div class="x_content">
          注册只会为此安装设置一个唯一的 ID。
          <br>
          No personal data is collected.
          <br>
          <form
            action="{{ url_for('admin_updates_register') }}"
            method="post"
          >
            <button id="register" type="submit" class="btn btn-success">
              一键注册！
            </button>
          </form>
          <div class="clearfix"></div>                        
        </div>
      </div>
    </div>
  </div>
</div>
{% else %}
<div class="row">
  <div class="col-md-12 col-sm-12 col-xs-12">
    <div class="x_panel">
      <div class="x_title">
        <h3><i class="fa fa-desktop"></i> 域 <small>下载预先创建的域作为基础</small></h3>
        <ul class="nav navbar-left panel_toolbox">
          <li><a id="domains" class="btn-new update-all"><span style="color: #5499c7; "><i class="fa fa-download"></i> 全部下载</span></a>
          </li>
        </ul>
        <ul class="nav navbar-right panel_toolbox">
          <li><a class="collapse-link"><i class="fa fa-chevron-up" style="color: #0055ff;"></i></a>
          </li>
        </ul>
        <div class="clearfix"></div>
      </div>
      <div class="x_content">
        <table id="domains_tbl" class="table" width="100%">
          <thead>
            <tr>
              <th></th>
              <th></th>
              <th>名称</th>
              <th>进程</th>
              <th></th>
            </tr>
          </thead>
          <tbody>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</div> -->
            
<!-- <div class="row">
  <div class="col-md-6 col-sm-6 col-xs-12">
    <div class="x_panel">
      <div class="x_title">
        <h3><i class="fa fa-circle-o"></i> Media <small>Download useful isos and floppy</small></h3>
        <ul class="nav navbar-left panel_toolbox">
            <li><a id="media" class="btn-new update-all"><span style="color: #5499c7; "><i class="fa fa-download"></i> Download all</span></a>
            </li>
        </ul>
        <ul class="nav navbar-right panel_toolbox">
            <li><a class="collapse-link"><i class="fa fa-chevron-down" style="color: #0055ff;"></i></a>
            </li>
        </ul>
        <div class="clearfix"></div>
      </div>
      <div class="x_content" style="display:none;">
        <table id="media_tbl" class="table" width="100%">
          <thead>
            <tr>
              <th></th>
              <th></th>
              <th>Name</th>
              <th>Progress</th>
              <th></th>
            </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
      </div>
    </div>
  </div>
  <div class="col-md-6 col-sm-6 col-xs-12">
    <div class="x_panel">
      <div class="x_title">
        <h3><i class="fa fa-video-camera"></i> 显卡 <small>显卡资源</small></h3>
        <ul class="nav navbar-left panel_toolbox">
            <li><a id="videos" class="btn-new update-all"><span style="color: #5499c7; "><i class="fa fa-download"></i> 全部下载</span></a>
            </li>
        </ul>
        <ul class="nav navbar-right panel_toolbox">
            <li><a class="collapse-link"><i class="fa fa-chevron-down" style="color: #0055ff;"></i></a>
            </li>
        </ul>
        <div class="clearfix"></div>
      </div>
      <div class="x_content" style="display:none;">
        <table id="videos_tbl" class="table" width="100%">
          <thead>
            <tr>
              <th></th>
              <th></th>
              <th>名称</th>
              <th></th>
            </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
      </div>
    </div>
  </div>
</div> -->

<div class="row">
  <div class="col-md-6 col-sm-6 col-xs-12">
    <div class="x_panel">
      <div class="x_title">
        <h3><i class="fa fa-wrench"></i> 操作系统硬件模板 <small>各种操作系统的桌面配置 (virt-install)</small></h3>
        <ul class="nav navbar-left panel_toolbox">
            <li><a id="virt_install" class="btn-new update-all"><span style="color: #5499c7; "><i class="fa fa-download"></i> Download all</span></a>
            </li>
        </ul>
        <ul class="nav navbar-right panel_toolbox">
            <li><a class="collapse-link"><i class="fa fa-chevron-down" style="color: #0055ff;"></i></a>
            </li>
        </ul>
        <div class="clearfix"></div>
      </div>
      <div class="x_content" style="display:none;">
        <table id="virt_install_tbl" class="table" width="100%">
          <thead>
            <tr>
              <th></th>
              <th></th>
              <th>名称</th>
              <th></th>
            </tr>
          </thead>
          <tbody>
          </tbody>
        </table>
      </div>
    </div>
  </div>
  <div class="col-md-6 col-sm-6 col-xs-12">
    <div class="x_panel">
      <div class="x_title">
        <h3><i class="fa fa-eye"></i> 查看器 <small>Microsoft spice 查看器</small></h3>
        <ul class="nav navbar-left panel_toolbox">
          <!--<li><a id="media" class="btn-new update-all"><span style="color: #5499c7; "><i class="fa fa-download"></i> Download all</span></a></li>-->
        </ul>
        <ul class="nav navbar-right panel_toolbox">
            <li><a class="collapse-link"><i class="fa fa-chevron-down" style="color: #0055ff;"></i></a>
            </li>
        </ul>
        <div class="clearfix"></div>
      </div>
      <div class="x_content" style="display:none;">
        <table id="viewers_tbl" class="table" width="100%">
          <thead>
            <tr>
              <th></th>
              <th>名称</th>
              <th></th>
            </tr>
          </thead>
          <tbody>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</div>
{% endif %}

{% endblock %}
{% block pagescript %}
    <!-- bootstrap-progressbar -->
    <script src="/isard-admin/vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script>
    <script src="/isard-admin/static/js/restful.js"></script>
    <script src="/isard-admin/static/admin/js/updates.js"></script>
{% endblock %}
